package com.dilidili.controller;

import com.dilidili.service.ICollectVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * 【请填写功能名称】Controller
 * 
 * @author ruoyi
 * @date 2022-03-31
 */
@RestController
@RequestMapping("/system/collect")
public class CollectVideoController
{
    @Autowired
    private ICollectVideoService collectVideoService;
    //取消收藏
    @RequestMapping("/offCollectVideo")
    public Object offCollectVideo(Integer userId,Integer videoId){
        return collectVideoService.offCollectVideo(userId,videoId);
    }
    //收藏
    @RequestMapping("/onCollectVideo")
    public Object onCollectVideo(Integer userId,Integer videoId){
        Date date=new Date();
        return collectVideoService.onCollectVideo(userId,videoId,date);
    }
}
